using System;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using WalkingTec.Mvvm.Core;

namespace HengTong.Model.Db.SupplyChain.Material;

public class SysRawMaterial : TopBasePoco
{
    /// <summary>
    /// 物料名称
    /// </summary>
    [Display(Name = "名称", Description = "物料名称")]
    [Required]
    [StringLength(512, ErrorMessage = "{0}长度不能超过{1}")]
    public string Name { get; set; }

    /// <summary>
    /// 物料唯一编码，用于系统内标识物料
    /// </summary>
    [Display(Name = "编码", Description = "物料唯一编码，用于系统内标识物料")]
    [StringLength(64, ErrorMessage = "{0}长度不能超过{1}")]
    public string Code { get; set; }
    
    [Display(Name = "类别编码", Description = "物料类别编码")]
    [StringLength(64)]
    [JsonIgnore]
    public string GroupCode { get; set; }
    
    [Display(Name = "类别名称", Description = "物料类别名称")]
    [StringLength(64)]
    public string GroupName { get; set; }
    
    [Display(Name = "单位编码", Description = "物料单位编码")]
    [StringLength(64)]
    [JsonIgnore]
    public string UnitCode { get; set; }
    
    
    [Display(Name = "单位名称", Description = "物料单位名称")]
    [StringLength(64)]
    public string UnitName { get; set; }
    
    /// <summary>
    /// 规格型号, 用于与EAS系统对接时标识物料规格
    /// </summary>
    [StringLength(1024)]
    [Display(Name = "规格型号", Description = "规格型号, 用于与EAS系统对接时标识物料规格")]
    public string Model { get; set; }
    
    /// <summary>
    /// 物料详细描述信息
    /// </summary>
    [Display(Name = "详情", Description = "物料详细描述信息")]
    [StringLength(1024, ErrorMessage = "{0}长度不能超过{1}")]
    [JsonIgnore]
    public string Description { get; set; }

}